<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.Date"%>
<%@page import="com.tarena.dao.*"%>
<%@page import="com.tarena.domain.*"%>

<%
	request.setCharacterEncoding("utf-8");
	Product product = new Product();
	ProductDao pd = new ProductDao();
	String[] productId = request.getParameterValues("productId");
	int[] pid = new int[productId.length];
	if (productId != null && productId.length > 0) {
		for (int i = 0; i < productId.length; i++) {
			pid[i] = Integer.parseInt(productId[i]);
		}
	}
	pd.deleteProductsById(pid);
	response.sendRedirect("list.jsp");
%>